package com.cby.android.sample.model

import android.app.Application
import com.cby.android.library.base.BasePageStateViewModel
import com.cby.android.sample.bean.wan.WanArticleBean
import com.cby.android.sample.repository.WanAndroidApiImpl

class ProjectListViewModel(application: Application) : BasePageStateViewModel<WanArticleBean>(application){

    private var wanAndroidApi = WanAndroidApiImpl()

    var cid: Int = 0

    override suspend fun loadPageData(page: Int): MutableList<WanArticleBean> {
        val articleResponse = wanAndroidApi.getProjectList(page, cid)
        return articleResponse.data.datas
    }
}